package com.peach.service.impl;


import com.peach.mapper.UserMapper;
import com.peach.pojo.Activity;
import com.peach.pojo.User;
import com.peach.pojo.UserBranch;
import com.peach.pojo.UserStage;
import com.peach.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;


    @Override
    public List<User> selectAllUsersByConditions(Integer userId, String userName, String userClass, Integer userBranchId, Integer userStageId) {
        return userMapper.selectAllUsersByConditions(userId,userName,userClass,userBranchId,userStageId);
    }

    @Override
    public List<User> selectAllUsers() {
        return userMapper.selectAllUsers();
    }

    @Override
    public Boolean insertOneUser(User user) {
        return userMapper.insertOneUser(user);
    }

    @Override
    public Boolean updateOneUser(User user) {
        return userMapper.updateOneUser(user);
    }

    @Override
    public Boolean deleteOneUser(Integer userId) {
        return userMapper.deleteOneUser(userId);
    }

    @Override
    public User selectUsersById(Integer userId) {
        return userMapper.selectUsersById(userId);
    }

    @Override
    public List<User> selectUsersByBranch(Integer userBranchId) {
        return userMapper.selectUsersByBranch(userBranchId);
    }

    @Override
    public List<User> selectUsersByStage(Integer userStageId) {
        return userMapper.selectUsersByStage(userStageId);
    }

    @Override
    public List<UserBranch> selectAllUserBranches() {
        return userMapper.selectAllUserBranches();
    }

    @Override
    public List<UserStage> selectAllUserStages() {
        return userMapper.selectAllUserStages();
    }

    @Override
    public User selectOneUser(Integer userId) {
        return userMapper.selectOneUser(userId);
    }


}
